<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta charset="utf-8">
<title>Document Infostant</title>
<style>
.left-column
{
float: left;
}
.g9
{
  float: left;

}
.content
{

}



body {
    font-family: sans-serif;
}
.prop {
    font-weight: bold;
}
.null {
    color: red;
}
.bool {
    color: blue;
}
.num {
    color: blue;
}
.string {
    color: green;
    white-space: pre-wrap;
}
.collapser {
    -moz-user-select: none;
    cursor: pointer;
    left: -1em;
    position: absolute;
}
.q {
    color: transparent;
    display: inline-block;
    width: 0;
}
li {
    position: relative;
}
#error {
    background-color: #F7E8E8;
    border: 1px solid #970000;
    margin: 0.5em;
    padding: 0.5em;
}
.errormessage {
    font-family: monospace;
}
#json {
    font-family: monospace;
    font-size: 1.1em;
    white-space: pre-wrap;
}
ul {
    list-style: none outside none;
    margin: 0 0 0 2em;
    padding: 0;
}
h1 {
    font-size: 1.2em;
}
.callback + #json {
    padding-left: 1em;
}
.callback {
    color: #A52A2A;
    font-family: monospace;
}

</style>
<script src="<?=baseinfo?>/js/vendor/jquery-1.9.1.min.js"></script>
<script>
<?
//global $classgroupsettingfolder,$classsettingfolder,$arrayinfoid,$infoid;
$classgroupsettingfolder=$data['shelf'];
if(count($classgroupsettingfolder))
{
$strinfofid="";
$firstkeyinfofid="";
foreach($classgroupsettingfolder as $valuegroupsetting)
{
   
   
   
   $strinfofid.="shelfid ".$valuegroupsetting['shelfid']." คือ ".$valuegroupsetting['title']." <br>";
   $firstkeyinfofid=$valuegroupsetting['shelfid'];
  


}

}


?>
function getDoc(docid)
{
   $.get('<?=baseinfo?>/ajax/getDoc',{docid:docid}, function(myObject) {
     

     $('#function1').html('ajax.'+myObject['data']['path']);
     $('#description1').html(myObject['data']['description']);
     $('#sample').html(myObject['data']['response']);  
          var required="";
         $('#dataparem').html('<h2>Params</h2><div style="width:700px;">');
         var strpathdata=new Array();
         var knum=0;
         var checkinfoid=0; 
     $.each(myObject['key'], function(key2, value2) { 
         required="";
         if(value2['need']==1)
         {
             required="(Required)";
             if(value2['key']=="shelfid")
             {
             value2['value']="<?=$firstkeyinfofid?>";
          
             }
             if(value2['key']=="data")
             {
             
              strpathdata[knum]=value2['value']; 
             
             }else
             {
             
              strpathdata[knum]=value2['key']+"="+value2['value']; 
             }
             
             knum++; 
         }
         
          
          if(value2['key']=="shelfid")
          {
          value2['description']="<?=$strinfofid?>";
          }
          
          
          
          
         $('#dataparem').append('<div style="width:600px;" ><div style="width:200px;float:left"><strong><span class="param">'+value2['key']+'</span> '+required+' : </strong></div><div style="width:300px;float:left">'+value2['description']+'</div></div><div style="clear:both"></div>');   
         
 });
    
     $('#dataparem').append('</div>');
     var getpath=strpathdata.join("&");
     if(myObject['data']['get']==1)
     {
        
        $('#example1').html('<a target="_blank" href="<?=baseinfo?>/ajax/'+myObject['data']['path']+'?'+getpath+'"><?=baseinfo?>/ajax/'+myObject['data']['path']+'?'+getpath+'</a>');
     
     }else
     {
     
     if(myObject['data']['enable']==1)
     {
     var linkurl='<a target="_blank" href="<?=baseinfo?>/ajax/checktestpost?testpost='+myObject['data']['path']+'&'+getpath+'"><?=baseinfo?>/ajax/'+myObject['data']['path']+'</a>';
     
     }else
     {
    var linkurl='<?=baseinfo?>/ajax/'+myObject['data']['path']+''; 
     
     }
     
     $('#example1').html(linkurl);
     
     }
     
     $('#g9data').show();
  });
}
$(document).ready(new function() {
      getDoc(1);
});
</script> 
</head>
<body>
<div class="content">
    <div class="r">
        <nav class="g3">
            <div class="left-column" style="width: 200px;">
    <?if(count($data['data'])){

        foreach($data['data'] as $keydata => $valuedata)
        {
    ?>
    <h2><?=$keydata?></h2>
    <ul class="wspanel">
         <?foreach($valuedata as $valuedata2){?>  
        <li><a href="javascript:void(0)" onclick="getDoc(<?=$valuedata2['docid']?>);"><?=$valuedata2['titledoc']?></a></li>
        <?}?>

  
  
    </ul>
    
    <?
    
        }
    }?>

    
</div>        </nav>
        
        <article class="g9" style="display: none; width: 600px;" id="g9data" >

            <h1 id="function1">ajax.getNeighbours</h1>

            <div class="wsdescription" id="description1" >
                Get a list of a user's neighbours on Last.fm.
            </div>

                                            
                <h2>Example URLs</h2>
                 <span id="example1"></span>  
            
                <div id="wsdescriptor">
                <div id="dataparem"></div>
                <h2>Sample Response</h2>
                <div id="sample">

                </div>
                
                 </div>
                
                
                  
                            
        </article>
    </div>
</div>
</body>
</html>
